<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .boximg img{
            width: 200px;
            height: 200px;
        }
    </style>
</head>

<body>
    <div id="app">
        <h1>{{message}}</h1>
        <div>
            <button @click="show">图片切换</button>
        </div>   
        <div class="boximg" v-show="isshow">
            <img src="http://p4.music.126.net/zLWAA9OfiEFcu49raLjv9A==/109951166170782513.jpg" alt="">
        </div>
    </div>
    <script src="https://unpkg.com/vue@next"></script>
    <script>
        //用vue创建app
        const app = Vue.createApp({
            // template: `

            // `,
            data() {
                return {
                    message: "Hello world",
                    isshow:false
                }
            },
            methods: {
                show:function(){
                    this.isshow=!this.isshow
                }
            }
        })
        //挂载app
        app.mount("#app")
    </script>

</body>

</html>